package com.example.owner.lettery1.modlus

import com.example.owner.lettery1.bean.Champion
import com.example.owner.lettery1.bean.LotteryBean
import com.example.owner.lettery1.bean.NetConfig
import com.example.owner.lettery1.bean.Record
import io.reactivex.Observable
import retrofit2.http.*


interface NewsApi {

    /*@GET("http://news.zhuoyicp.com/channel/json.json")
    fun getChannel(): Observable<ArrayList<Channel>>
*/

//    @GET("http://news.zhuoyicp.com/h5/{type}/json.json")
//    fun getNews(@Path("type") type: String): Observable<ArrayList<NewTitle>>

    @GET("kjhall")
    fun getLotteryList(@Query("getData") data: String): Observable<NetBean<ArrayList<LotteryBean>>>

    @POST("kjinfo")
    @FormUrlEncoded
    fun getChampionInfo(@Field("getData") getData: String, @Field("lotid") lotId: String,
                        @Field("issue") issue: String): Observable<NetBean<Champion>>

    @FormUrlEncoded
    @POST("recents")
    fun getRecents(@Field("playid") id: String, @Field("selnum") number: String,
                   @Field("page") page: Int, @Field("getData") getData: String) : Observable<NetBean<ArrayList<Record>>>

    @POST(NetApi.SWITCH_URL)
    fun getSwitch(@Query("appid") appId: String): Observable<NetConfig>
}